<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%@include file="common.jsp"%>
<!-- 内容区域 -->
<div class="tpl-content-wrapper">
	<div class="row-content am-cf">
		<div class="row">
			<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
				<div class="widget am-cf">
					<div class="widget-head am-cf">
						<div class="widget-title  am-cf">订单详情列表</div>

					</div>
					<div class="widget-body  am-fr">
						<div class="am-u-sm-12">
							<table width="100%"
								class="am-table am-table-compact am-table-striped tpl-table-black ">
								<thead>
									<tr>
										<th>序号</th>
										<th>订单号</th>
										<th>商品名称</th>
										<th>购买数量</th>
										<th>价格</th>
									</tr>
								</thead>
								<tbody>
									<c:forEach items="${ordersInfo}" var="item">
										<tr class="gradeX">
											<td>${item.id }</td>
											<td>${item.orderId }</td>
											<td>${item.goodName }</td>
											<td>${item.buyNum }</td>
											<td>${item.sinPrice }</td>
										</tr>
									</c:forEach>
								</tbody>
							</table>
						</div>
						<div class="am-u-lg-12 am-cf">

							<div class="am-fr">
								<ul class="am-pagination tpl-pagination">

									<!-- 上一页 -->
									<c:choose>
										<c:when test="${ pageHelper.currentPageIndex == 1}">
											<li class="am-disabled"><a
												href="${pageContext.request.contextPath}/backOrder/getOrderInfo.shtml?pageIndex=${pageHelper.currentPageIndex-1}&orderId=${ordersInfo[0].orderId}">«</a></li>
										</c:when>
										<c:otherwise>
											<li><a
												href="${pageContext.request.contextPath}/backOrder/getOrderInfo.shtml?pageIndex=${pageHelper.currentPageIndex-1}&orderId=${ordersInfo[0].orderId}">«</a></li>
										</c:otherwise>
									</c:choose>

									<!-- 页码 -->
									<c:forEach items="${pageHelper.pageNumList }" var="item">
										<c:if test="${ pageHelper.currentPageIndex == item}">
											<li class="am-active"><a
												href="${pageContext.request.contextPath}/backOrder/getOrderInfo.shtml?pageIndex=${item}&orderId=${ordersInfo[0].orderId}">${item }</a></li>
										</c:if>
										<c:if test="${ pageHelper.currentPageIndex != item}">
											<li><a
												href="${pageContext.request.contextPath}/backOrder/getOrderInfo.shtml?pageIndex=${item}&orderId=${ordersInfo[0].orderId}">${item }</a></li>
										</c:if>
									</c:forEach>

									<!-- 下一页 -->
									<c:choose>
										<c:when
											test="${ pageHelper.currentPageIndex == pageHelper.totalPages}">
											<li class="am-disabled"><a
												href="${pageContext.request.contextPath}/backOrder/getOrderInfo.shtml?pageIndex=${pageHelper.currentPageIndex+1}&orderId=${ordersInfo[0].orderId}">»</a></li>
										</c:when>
										<c:otherwise>
											<li><a
												href="${pageContext.request.contextPath}/backOrder/getOrderInfo.shtml?pageIndex=${pageHelper.currentPageIndex+1}&orderId=${ordersInfo[0].orderId}">»</a></li>
										</c:otherwise>
									</c:choose>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</div>
</div>
<script
	src="${pageContext.request.contextPath}/assets/js/amazeui.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/app.js"></script>

</body>

</html>